package com.tydic.deviceParse;

/**
 * Created by maliang on 2017/5/4.
 */
public class COMConfig {
    private static COMConfig instance;
    private String portname;
    private int baudrate;
    private int databits;
    private int stopbits;
    private int parity;
    private int weightIntStart;
    private int weightIntEnd;

    private COMConfig() {

    }

    public String getPortname() {
        return portname;
    }

    public void setPortname(String portname) {
        this.portname = portname;
    }

    public int getBaudrate() {
        return baudrate;
    }

    public void setBaudrate(int baudrate) {
        this.baudrate = baudrate;
    }

    public int getDatabits() {
        return databits;
    }

    public void setDatabits(int databits) {
        this.databits = databits;
    }

    public int getStopbits() {
        return stopbits;
    }

    public void setStopbits(int stopbits) {
        this.stopbits = stopbits;
    }

    public int getParity() {
        return parity;
    }

    public void setParity(int parity) {
        this.parity = parity;
    }

    public int getWeightIntStart() {
        return weightIntStart;
    }

    public void setWeightIntStart(int weightIntStart) {
        this.weightIntStart = weightIntStart;
    }

    public int getWeightIntEnd() {
        return weightIntEnd;
    }

    public void setWeightIntEnd(int weightIntEnd) {
        this.weightIntEnd = weightIntEnd;
    }

    public static COMConfig getInstance() {
        if (instance == null)
            instance = new COMConfig();
        return instance;
    }
}
